//
//  ExitTableViewCell.m
//  shijianpinggu
//
//  Created by apple on 2017/11/6.
//  Copyright © 2017年 apple. All rights reserved.
//

#import "ExitTableViewCell.h"
#import "AppDelegate.h"
#import "YLoginViewController.h"

@implementation ExitTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.exitButton.layer.cornerRadius = 10;
    self.exitButton.layer.masksToBounds = YES;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (IBAction)exitButtonAction:(UIButton *)sender {
    [[NSUserDefaults standardUserDefaults] removeObjectForKey:@"userid"];
    AppDelegate *appDelegate = [UIApplication sharedApplication].delegate;
    appDelegate.window.rootViewController = [YLoginViewController new];
}
@end
